<template>
  <div class="client_wrap">
    <van-button type="primary" @click="toClientDetail">客户</van-button>
  </div>
</template>

<script>
import { defineComponent, onMounted } from 'vue';
export default defineComponent({
  name: 'Client',
});
</script>
<script setup>
import { groupByDesc } from '@/utils/sort.js';
import { useRouter } from 'vue-router';
// router
const router = useRouter();
const toClientDetail = () => {
  router.push({
    path: '/clientDetail',
  });
};

onMounted(() => {
  var arr = [
    { name: '北京', value: '北京' },
    { name: '天津', value: '天津' },
    { name: '上海', value: '上海' },
    { name: '重庆', value: '重庆' },
    { name: '新疆', value: '新疆' },
    { name: '西藏', value: '西藏' },
    { name: '宁夏', value: '宁夏' },
    { name: '内蒙古', value: '内蒙古' },
    { name: '广西', value: '广西' },
    { name: '黑龙江', value: '黑龙江' },
    { name: '吉林', value: '吉林' },
    { name: '辽宁', value: '辽宁' },
    { name: '河北', value: '河北' },
    { name: '山东', value: '山东' },
    { name: '江苏', value: '江苏' },
    { name: '安徽', value: '安徽' },
    { name: '浙江', value: '浙江' },
    { name: '福建', value: '福建' },
    { name: '广东', value: '广东' },
    { name: '海南', value: '海南' },
    { name: '云南', value: '云南' },
    { name: '贵州', value: '贵州' },
    { name: '四川', value: '四川' },
    { name: '湖南', value: '湖南' },
    { name: '湖北', value: '湖北' },
    { name: '河南', value: '河南' },
    { name: '山西', value: '山西' },
    { name: '陕西', value: '陕西' },
    { name: '甘肃', value: '甘肃' },
    { name: '青海', value: '青海' },
    { name: '江西', value: '江西' },
    { name: '台湾', value: '台湾' },
    { name: '香港', value: '香港' },
    { name: '澳门', value: '澳门' },
    { name: 'CBA', value: 'CBA' },
    { name: 'NBA', value: 'NBA' },
    { name: '@', value: '@' },
    { name: '#', value: '#' },
    { name: '&', value: '&' },
  ];
  console.log(groupByDesc(arr));
});
</script>

<style lang="scss" scoped>
.client_wrap {
  width: 100%;
  height: 100%;
}
</style>
